<?php
	require '../../include/library.inc.php';
	require '../../include/admin_login.inc.php';
	
	$project_id = intval($_GET['project_id']);
	$top = intval($_GET['top']);
	
	if($project_id) {
		$sql = "UPDATE 
				  projects
				SET
				  top = $top
				WHERE
				  project_id = $project_id 
				 ";
		query($sql);
	}
  
	redirect($_SERVER['HTTP_REFERER']);
?>